﻿Friend Class frmLoading
    Private Sub frmLoading_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.Text = "Für Steuerungsinformationen 'H' oder F1!"
    End Sub

    Private Sub frmLoading_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick

    End Sub


    Private Sub frmLoading_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseWheel
        If e.Delta > 0 Then
            ClsBusyIcon1.Interval += 10
        ElseIf e.Delta < 0 Then
            ClsBusyIcon1.Interval -= 10
        End If
        UpdateInfo()
    End Sub

    Private Sub UpdateInfo()
        Me.Text = "Enabled:" + ClsBusyIcon1.Enabled.ToString + " | Interval:" + ClsBusyIcon1.Interval.ToString + " | CW: " + ClsBusyIcon1.Clockwise.ToString
    End Sub

    Private Sub ClsBusyIcon1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ClsBusyIcon1.KeyDown
        Select Case e.KeyCode
            Case Windows.Forms.Keys.H
                MsgBox("Ein-/Ausschalten: Linke Maustaste" + vbCrLf + _
                       "Geschwindigkeit ändern: Mausrad drehen" + vbCrLf + _
                       "Drehrichtung ändern: Rechte Maustaste" + vbCrLf + _
                       "Farbe wählen: Mittlere Maustaste", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "Hilfe")
            Case Windows.Forms.Keys.F1
                MsgBox("Ein-/Ausschalten: Linke Maustaste" + vbCrLf + _
                       "Geschwindigkeit ändern: Mausrad drehen" + vbCrLf + _
                       "Drehrichtung ändern: Rechte Maustaste" + vbCrLf + _
                       "Farbe wählen: Mittlere Maustaste", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "Hilfe")
            Case Windows.Forms.Keys.D
                Dim i As Integer = ClsBusyIcon1.IconType
                i += 1
                i = i Mod 4
                ClsBusyIcon1.IconType = i
                Me.Text = i.ToString
            Case Windows.Forms.Keys.A
                Dim i As Integer = ClsBusyIcon1.IconType
                i -= 1
                i = i Mod 4
                ClsBusyIcon1.IconType = Math.Abs(i)
                Me.Text = i.ToString
        End Select
    End Sub

    Private Sub ClsBusyIcon1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ClsBusyIcon1.MouseClick
        Select Case e.Button
            Case Windows.Forms.MouseButtons.Left
                ClsBusyIcon1.Enabled = Not ClsBusyIcon1.Enabled
            Case Windows.Forms.MouseButtons.Right
                ClsBusyIcon1.Clockwise = Not ClsBusyIcon1.Clockwise
            Case Windows.Forms.MouseButtons.Middle
                If pColorDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
                    ClsBusyIcon1.ForeColor = pColorDialog.Color
                End If

        End Select

        UpdateInfo()
    End Sub
End Class